package com.neuedu.controller;

import com.neuedu.entity.Goods;
import com.neuedu.entity.UserConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class IndexController {
    @Value("${com.neuedu.title}")
    private String title;

    @Autowired
    private UserConfig user;

    @GetMapping("/Index")
    public List<UserConfig> getUser(){
        List<UserConfig> list=new ArrayList<>();
//        User user=new User();
//        user.setId(1);
//        user.setUsername("光头强");
//        user.setPassword("000000");
        log.debug("这是一个lombok的日志测试");
        list.add(user);

        return list;
    }
    @GetMapping("/Title")
    public String getTitle(){
        Goods goods=new Goods();

        return title;
    }
}
